OpenCities Map Help

Assign Primary Key with an Annotation

Next, OpenCities Map in a read/write setup requires the creation of a primary key for the annotation table. A primary key is required on the combination of the table’s identifier combined with the identifier it refers to in the parent table. For this, an ALTER TABLE statement is used.

For the previously created Owner_Text table the primary key would be added as follows:

ALTER TABLE OWNER_TEXT
ADD CONSTRAINT OWNER_TEXT_PK
PRIMARY KEY (Owner_Text_ID);